/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.att.network.acronym;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author zw251y
 */
public class Util {
    // Create table acronym (id identity, name varchar(30), INSERT_TIME TIMESTAMP, text varchar(120), author integer);
     public  static Connection getCon(String db)
     {
         //if (db == null) db = "/opt/hsqldb/english/mydatabase";
         Connection con = null;
         try {
            con = DriverManager.getConnection("jdbc:hsqldb:" + db, "SA", "");
           
        } catch (SQLException e) {
             e.printStackTrace();
        }
         return con;
     }
             
    
    static {

        try {
            Class.forName("org.hsqldb.jdbc.JDBCDriver");
           
        } catch (ClassNotFoundException e) {
            e.printStackTrace(System.out);
        }
    }
    
    
    
}
